{% extends 'base.html' %}

{% block title %} 添加文章 {% endblock %}

{% block content %}
<div style="text-align: center;">

    <h1>添加文章</h1>
        
    <form action="{{ url_for('article.add_article') }}" method="post">
        <p><input type="text" name="title" placeholder="文章标题"></p>
        <p>
            <textarea name="content" id="" cols="50" rows="10" placeholder="输入文章内容"></textarea>
        </p>
        <p>
            用户:
            <select name="uid">
                <option value="0">请选择用户</option>
                {% for user in users %}
                    <option value="{{ user.id }}">{{ user.username }}</option>
                {% endfor %}
            </select>   
        </p>
        <p><input type="submit" vaue="添加文章"></p>
    </form>
</div>
{% endblock %}